-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(line_annotation): use scaleAndValidate for line annotations #236
fix(line_annotation): use scaleAndValidate for line annotations #236
Conversation
Codecov Report
@@ Coverage Diff @@
## master #236 +/- ##
==========================================
- Coverage 97.75% 97.75% -0.01%
==========================================
Files 36 36
Lines 2630 2626 -4
Branches 588 587 -1
==========================================
- Hits 2571 2567 -4
Misses 52 52
Partials 7 7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM!
## [6.0.1](v6.0.0...v6.0.1) (2019-06-14) ### Bug Fixes * **line_annotation:** use scaleAndValidate for line annotations ([#236](#236)) ([48b180a](48b180a))
🎉 This PR is included in version 6.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [6.0.1](elastic/elastic-charts@v6.0.0...v6.0.1) (2019-06-14) ### Bug Fixes * **line_annotation:** use scaleAndValidate for line annotations ([opensearch-project#236](elastic/elastic-charts#236)) ([1d57482](elastic/elastic-charts@1d57482))
Summary
This PR introduces a fix for the issue where when we are in histogram mode, if a line annotation dataValue is outside of the xScale domain min & max, the line will not render. In the screenshot below, note that in regular bar series mode, the annotation line is drawn at 3.5, which in regular mode should not be visible as the xAxis ends at 3; however in histogram mode, we extend the domain by the minInterval, so the line should be visible at 3.5.
Implementation of this fix involved passing in the
enableHistogramMode
to thecomputeXDomainLineAnnotations
function so that we could leverage thescaleAndValidateDatum
function already used by RectAnnotations.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] Any consumer-facing exports were added tosrc/index.ts
(and stories only import from../src
except for test data & storybook)